import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import Login from '@/components/Login'
import Then from '@/components/Then'
import List from '@/components/List'
import User from '@/components/User'
import Detail from '@/components/Detail'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home,
      redirect:'/then',
      children:[
        {
          path: '/then',
          name: 'Then',
          component: Then
        },
        {
          path: '/list',
          name: 'List',
          component: List
        },
        {
          path: '/user',
          name: 'User',
          component: User
        },
        {
          path: '/detail',
          name: 'Detail',
          component: Detail
        }
      ]
    },
    {
      path: '/login',
      name: 'Login',
      component: Login
    }
  ]
})
